<!--定金订单管理页面-->
<template>
	<section>
		<!--工具条-->
		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
			<el-form :inline="true" :model="filters">
				<el-form-item>
					<el-input v-model="filters.opUser" placeholder="操作用户"></el-input>
				</el-form-item>
				<el-form-item>
					<el-button type="primary" v-on:click="getSystemLogs">查询</el-button>
				</el-form-item>
				<el-form-item>
					<el-button type="info" v-on:click="getAllSystemLogs">清空查询</el-button>
				</el-form-item>
			</el-form>
		</el-col>

		<!--列表-->
		<el-table :data="systemLogss" highlight-current-row stripe border v-loading="listLoading" @selection-change="selsChange" style="width: 100%">
			<el-table-column type="selection" width="50px">
			</el-table-column>
			<el-table-column type="index" width="70px" label="编号">
				<!--自定义编号-->
				<template scope="scope">
					<span>{{(page - 1) * 10 + scope.$index + 1}}</span>
				</template>
			</el-table-column>
			<el-table-column prop="opUser" label="操作用户" width="170px">
			</el-table-column>
			<el-table-column   label="操作时间" width="180px" sortable>
				<!--使用过滤器的写法 scope.row.字段名-->
				<template slot-scope="scope">
					<span>{{ scope.row.opTime | formatDate('yyyy-MM-dd HH:mm:ss') }}</span>
				</template>
			</el-table-column>
			<el-table-column prop="opIp" label="登录IP" width="105px" sortable>
			</el-table-column>
			<el-table-column prop="function" label="使用功能" width="90px">
			</el-table-column>
			<el-table-column prop="params" label="参数" >
			</el-table-column>
		</el-table>

		<!--分页工具条-->
		<el-col :span="24" class="toolbar">
			<el-pagination layout="total,prev, pager, next,jumper" @current-change="handleCurrentChange" :page-size="10" :total="total" style="float:right;">
			</el-pagination>
		</el-col>
		
	</section>
</template>

<script>
	/*git测试,增加此注释*/
	import {batchRemoveUser} from "../../api/api";

	export default {
		data() {
			return {
				filters: {
					opUser: '',
				},
				systemLogss: [],
				systemLogs:'',
				total: 0,
				page: 1,
				listLoading: false,
				sels: [],//列表选中列

			}
		},
		methods: {
			//分页信息
			handleCurrentChange(val){
				this.page = val;
				this.getSystemLogs();
			},
			getAllSystemLogs(){
				this.filters.opUser = '';
				this.getSystemLogs();
			},
			//获取用户列表
			getSystemLogs() {
				let param = {
					"currentPage":this.page,
					"opUser":this.filters.opUser
				}

				this.listLoading = true;
				this.$http.patch('/systemLog/queryPage',param).then((res) => {
					this.systemLogss = res.data.rows;
					this.total = res.data.total;
					this.listLoading = false;
				});
			},
			selsChange: function (sels) {
				this.sels = sels;
			},
		},
		mounted() {
			this.getSystemLogs();
		}
	}

</script>

<style scoped>

</style>